import { RouteRecordRaw } from "vue-router";

export const staticRoutes: Array<RouteRecordRaw> = [
  {
    path: "/",
    name: "Home",
    component: () => import("../views/Home/index.vue"),
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login/index.vue'),
    meta: {
      isHidden: true
    }
  },
  {
    path: '/search',
    name: 'Search',
    redirect:'/search/searchDialog',
    component: () => import('../components/Search/index.vue'),
    children:[
      {
        path: 'searchDialog',
        name: 'SearchDialog',
        component: () => import('../components/Search/searchDialog/index.vue'),
        meta: {
          isHidden: true
        }
      },
      {
        path: 'searchGoodsList',
        name: 'SearchGoodsList',
        component: () => import('../components/Search/searchGoodsList/inde.vue'),
        meta: {
          isHidden: true
        }
      }
    ]
  },
  {
    path: '/item',
    name: 'Item',
    component: () => import('../views/item/index.vue'),
    children: [
      {
        path: 'cateList',
        name: 'CateList',
        component: () => import('../views/item/cateList/index.vue')
      },
      {
        path:'list',
        name:'List',
        component: () => import('../views/item/list/index.vue'),
        meta: {
          isHidden: true
        }
      },
      {
        path:'/item',
        redirect:'/item/cateList'
      },
      {
        path:'homeList',
        name:'HomeList',
        component: () => import('../views/item/homeList/index.vue'),
        meta:{
          isHidden:true
        }
      },
    ]
  },
  {
    path: "/detail/:id?",
    name: "Detail",
    component: () => import("../views/detail/index.vue"),
    meta:{
      isHidden:true
    }
  },
  {
    path: "/topic",
    name: "Topic",
    component: () => import("../views/topic/index.vue"),
    children: [
      {
        path: "index",
        name: "Index",
        component: () => import("../views/topic/index/index.vue"),
      },
    ],
  },
  { 
    path: "/cart",
    name: "Cart",
    component: () => import("../views/cart/index.vue"),
  },
  {
    path: '/ucenter',
    name: 'Ucenter',
    component: () => import('../views/ucenter/index.vue'),
    children: [{
      path: 'unav',
      name: 'unav',
      component: () => import('@/views/Unav/index.vue'),
      meta: {
        isHidden: true
      }
    },
    {
      path: 'aliasInfo',
      name: 'aliasInfo',
      component: () => import('@/views/aliasInfo/index.vue'),
      meta: {
        isHidden: true
      }
    },
  ]
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import('../views/register/index.vue'),
    meta: {
      isHidden: true
    }

  },
  {
    path: "/404",
    name: "404",
    component: () => import("../views/error/404.vue"),
  },
  {
    path: "/:pathMatch(.*)",
    name: "Any",
    redirect: "/404",
  },
];
